home *** CD-ROM | disk | FTP | other *** search
- $outvar(devnull)
- <!--------------------------------------------------------------------
- po/lineitems.infile - Blend infile used to produce the
- html with the user selected line items. Behaviour
- changes based on whether the $ChangeValue variable
- is set to "Allow" or not. If it is allow, the
- form will provide input fields for changing the
- quantity of items chosen.
- Used by po.blend
-
- 1996-09-25 RKJ-000 Original version
- -->
- $endout
- <!-- build the line item table -->
- $set(tempcolspan,4)
- <TABLE border=1 width="100%" >
- <TR>
- <TD align=center><STRONG>ITEM ID</STRONG></TD>
- <TD align=center ><STRONG>ITEM NAME</STRONG></TD>
- $if($equal($DisplayCategory,"TRUE"))
- <TD align=center><STRONG>CATEGORY</STRONG></TD>
- $inc(tempcolspan)
- $endif
- <TD align=center><STRONG>UNITS</STRONG></TD>
- <TD align=center><STRONG>UNIT PRICE</STRONG></TD>
- <TD align=center><STRONG>TOTAL PRICE</STRONG></TD>
- </TR>
-
- <!-- loop through selected products for display purposes -->
- $set(loop,0)
- $set(bigTotal,0)
- $set(badTotal,0)
- $while($not($equal($ProductCount,$loop)))
-
- $if($var(ItemUnits$loop$))
- $if($equal($var(ItemUnits$loop$),0))
- $if($var(ItemUnits$loop$check))
- $set(aVal,1)
- $else
- $set(aVal,0)
- $endif
- $else
- $set(aVal,$var(ItemUnits$loop$))
- $endif
- $else
- $if($var(ItemUnits$loop$check))
- $set(aVal,1)
- $else
- $set(aVal,0)
- $endif
- $endif
- $set(aVal,$fmt("%.0f",$aVal,"double"))
- $if($not($equal($aVal,0)))
- $if($var(ItemCost$loop$))
- $set(tempCost,$fmt("%.2f",$var(ItemCost$loop$),"double"))
- $if($and($gt($tempCost$,"0.00"),$le($tempCost$,"99999999.99")))
- $set(aTotal,$mult($aVal,$tempCost$))
- $else
- $set(aTotal,"N/A")
- $endif
- $else
- $set(aTotal,"N/A")
- $endif
- <TR>
- <TD>$var(ItemCode$loop$) </td>
- <td>$var(ItemName$loop$) </td>
- $if($equal($DisplayCategory,"TRUE"))
- <TD>$var(ItemCategory$loop$)</TD>
- $endif
- <TD>
- $if($equal($ChangeValue,"Allow"))
- <INPUT TYPE="text" NAME="ItemUnits$loop$" VALUE="$aVal" SIZE="5">
- $else
- $aVal
- <INPUT TYPE=hidden NAME="ItemUnits$loop$" VALUE="$aVal" SIZE="5">
- $endif
- </TD>
- <td align="right">
- $if($var(ItemCost$loop$))
- $set(tempCost,$fmt("%.2f",$var(ItemCost$loop$),"double"))
- $if($and($gt($tempCost$,"0.00"),$le($tempCost$,"99999999.99")))
- $Currency$$tempCost$
- $else
- $var(ItemCost$loop$)
- $endif
- $if($var(ItemUnitOfMeasure$loop$)) /
- $var(ItemUnitOfMeasure$loop$)$endif$ </td>
- $else
- </TD>
- $endif
- $if($equal($aTotal,"N/A"))
- <td align="right">$aTotal$</td>
- $else
- <td align="right">$Currency$$fmt("%.2f",$aTotal$,"double") </td>
- $endif
- </TR>
- $if($equal($aTotal,"N/A"))
- $inc(badTotal)
- $else
- $set(bigTotal,$add($aTotal,$bigTotal))
- $endif
- $else
- <INPUT TYPE=hidden NAME="ItemUnits$loop$" VALUE="$aVal" SIZE="10">
- $endif
- $if($var(ItemUnits$loop$check))
- <INPUT TYPE=hidden NAME="ItemUnits$loop$check" VALUE="on" SIZE="10">
- $endif
- $inc(loop)
- $endwhile
- <TR>
- $if($equal($PageName,"Details"))
- $set(tempcolspan,$minus($tempcolspan,1))
- <TD colspan=$tempcolspan align="right">
- <INPUT TYPE=submit name=SubmitType VALUE="Recalculate">
- </td>
- $set(tempcolspan,1)
- $endif
- $if($gt($badTotal,0))
- <TD colspan=$tempcolspan align="right"><STRONG>Grand Total*</STRONG></td>
- <td align="right"><STRONG>N/A </STRONG></td>
- $else
- <TD colspan=$tempcolspan align="right"><STRONG>Grand Total*</STRONG></td>
- <td align="right"><STRONG>$Currency$$fmt("%.2f",$bigTotal$,"double") </STRONG></td>
- $endif
- </TR>
- </TABLE>
- $if($gt($badTotal,0))
- <center>*$badTotal$ item(s) have been selected which do not have a price.<br>
- This order will be treated as a Request For Quote.</center>
- $else
- <center>*Excluding shipping/handling and applicable taxes</center>
- $endif
-